import request from '@/utils/request'

export function fetchList({ size, current, ...data }) {
  return request({
    url: '/v1/user/query/pages',
    method: 'post',
    params: { size, current },
    data
  })
}

export function addFace(data) {
  return request({
    url: '/v1/face/add',
    method: 'post',
    data
  })
}

export function updateFace(data) {
  return request({
    url: '/v1/face/update',
    method: 'post',
    data
  })
}

export function deleteFace(data) {
  return request({
    url: '/v1/face/delete',
    method: 'post',
    data
  })
}

export function getInfo(params) {
  return request({
    url: '/v1/user/getInfo',
    method: 'post',
    params
  })
}

export function feiyouInit(params) {
  return request({
    url: '/feiyou/init',
    method: 'get',
    params
  })
}

export function addUser(data) {
  return request({
    url: '/v1/user/save',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/v1/user/update',
    method: 'post',
    data
  })
}

export function deleteUser(data) {
  return request({
    url: '/v1/user/delete',
    method: 'post',
    data
  })
}
